<template>
  <div class="aui-wrapper aui-page__login">
    <span>{{ callbackSelected }}  </span>
    <div @click="getCaptcha"> 点击</div>
  </div>
</template>
<script>
export default {
  data () {
    return {
      captchaPath: '',
      dataForm: {
        username: '',
        password: '',
        uuid: '',
        captcha: ''
      }
    }
  },
  computed: {
    dataRule () {
      return {
        username: [
          { required: true, message: this.$t('validate.required'), trigger: 'blur' }
        ],
        password: [
          { required: true, message: this.$t('validate.required'), trigger: 'blur' }
        ],
        captcha: [
          { required: true, message: this.$t('validate.required'), trigger: 'blur' }
        ]
      }
    }
  },
  props: {
    callbackSelected: {
      type: String,
      default: 'dictValue', // dictLabel
      required: false,
    },
  },
  watch: {
    callbackSelected: function(newVal, oldVal) {
      console.log('HelloWorld222.watch.newVal:' + newVal)
      console.log('HelloWorld222.watch.oldVal:' + oldVal)
    }
  },
  created () {
    console.log('HelloWorld222.vue.created')
    this.getCaptcha()
  },
  methods: {
    // 获取验证码
    getCaptcha () {
      console.log('===========')
      // this.dataForm.uuid = getUUID()
      // this.captchaPath = `${window.SITE_CONFIG['apiURL']}/captcha?uuid=${this.dataForm.uuid}`
    },
  }
}
</script>
